/*
 * Copyright (C) 2018 The Asiainfo-Ability Authors
 *
 *      Licensed under the Apache License, Version 2.0 (the "License");
 *      you may not use this file except in compliance with the License.
 *      You may obtain a copy of the License at
 *
 *          http://www.apache.org/licenses/LICENSE-2.0
 *
 *      Unless required by applicable law or agreed to in writing, software
 *      distributed under the License is distributed on an "AS IS" BASIS,
 *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *      See the License for the specific language governing permissions and
 *      limitations under the License.
 */

package org.asiainfo.ability.gateway.model;

import org.asiainfo.ability.gateway.code.OnOffState;

import java.util.Date;

/**
 * @Author: visen
 * @Date: 2018/1/16
 * @Description:
 */
public class UserAbility {
    private String id;
    private String abilityId;
    private String clientId;
    private String userId;
    //该值如果不为空，则覆盖ability perRatelimit
    private int rateLimit;
    //该值如果不为空，则覆盖ability timeout值
    private int timeout;
    //超时阀值 一分钟内 超时xx次后，系统对"当前接入者使用这个能力"自动降级 （-1不校验）
    //该值如果不为空，则覆盖ability perMaxTimeoutTimes值
    private int maxTimeoutTimes;
    private Date updateTime;

    private String abilityName;

    private OnOffState state;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getAbilityId() {
        return abilityId;
    }

    public void setAbilityId(String abilityId) {
        this.abilityId = abilityId;
    }

    public int getRateLimit() {
        return rateLimit;
    }

    public void setRateLimit(int rateLimit) {
        this.rateLimit = rateLimit;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public int getMaxTimeoutTimes() {
        return maxTimeoutTimes;
    }

    public void setMaxTimeoutTimes(int maxTimeoutTimes) {
        this.maxTimeoutTimes = maxTimeoutTimes;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public OnOffState getState() {
        return state;
    }

    public void setState(OnOffState state) {
        this.state = state;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getAbilityName() {
        return abilityName;
    }

    public void setAbilityName(String abilityName) {
        this.abilityName = abilityName;
    }
}
